Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ignore the absence of the tests folder #288

Merged
merged 2 commits into from
May 11, 2021
Merged

Conversation

gregorip02
Copy link
Contributor

@gregorip02 gregorip02 commented Apr 10, 2021

Q A
Bug fix? yes
New feature? no
Fixed tickets Fix #194

This PR makes it less strict to check for the existence of a tests folder in the main directory of the project. It can be useful for projects that prefer to test in some other weird folder. For example.

# A structure of a scripting project only

├── app
│   │── fibonacci.php
│   └── fibonacci_test.php
├── composer.json
├── composer.lock
└── phpunit.xml
<!-- phpunit.xml -->

<testsuite name="Test Suite">
    <directory suffix="_test.php">./app</directory>
</testsuite>

Note that my tests are simple files with a suffix _test.php in a folder other than tests, so with the current version of pest, if I run vendor/bin/pest it will fail with an exception of type InvalidUsesPath.

Also contributing to #283

@nunomaduro
Copy link
Member

Lets wait to have #283 merged first.

@nunomaduro
Copy link
Member

@gregorip02 Is this ready?

@gregorip02
Copy link
Contributor Author

@gregorip02 Is this ready?

Yep, it's ready.

@nunomaduro nunomaduro merged commit 7bb12b7 into pestphp:master May 11, 2021
@nunomaduro
Copy link
Member

Please perform a pull request that updates the changelog.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Tests outside of tests directory won't load/run
2 participants